take a shellacking

Be soundly beaten or defeated, as in Our team took quite a shellacking last night. Why being coated with shellac should suggest defeat is not clear. [ ; c. 1930 ]